//
//  VideoViewController.swift
//  DriverSchoolAPP
//
//  Created by Logel on 2017/5/31.
//  Copyright © 2017年 Logel. All rights reserved.
//

import UIKit

class VideoViewController: UIViewController {
    var player = ZYPlayer()
    var vURL = ""
    override func viewDidLoad() {
        super.viewDidLoad()

        player = ZYPlayer(nibName: "ZYPlayer", bundle: nil, onView: self.view, orgFrame: CGRect(x: 5, y: 70, width: KMainScreenWidth-10, height:200) , url: vURL)
        // 下面是可选的属性设置
        player.fillMode = .resizeAspectFill
        view.addSubview(player.view)
        addChildViewController(player)
    }
    
    override func viewWillDisappear(_ animated: Bool) {
        player.releasePlayer()
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
